<?php /* Smarty version Smarty-3.0.7, created on 2014-01-03 17:22:39
         compiled from "E:/runtime/other/zqn.sh/app_admin/_view/templates\album/picture/add.html" */ ?>
<?php /*%%SmartyHeaderCode:2052452c6815f1cc642-83217766%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '59e0bcf56a95dda7520a76a8216c89b2f4831d47' => 
    array (
      0 => 'E:/runtime/other/zqn.sh/app_admin/_view/templates\\album/picture/add.html',
      1 => 1388740954,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '2052452c6815f1cc642-83217766',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php $_template = new Smarty_Internal_Template("_header.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<?php $_template = new Smarty_Internal_Template("_navibar.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<?php $_template = new Smarty_Internal_Template("_sidebar.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<div class="content">
    <div class="header">
        <div class="stats">
            <p class="stat"><!--span class="number"></span--></p>
        </div>
        <h1 class="page-title">添加照片</h1>
    </div>
    <ul class="breadcrumb">
        <li><a href="#">控制面板 </a> <span class="divider">/</span></li>
        <li><a href="./?application=admin&controller=album">作品展示 </a> <span class="divider">/</span></li>
        <li><a href="./?application=admin&controller=album_picture&album=<?php echo $_smarty_tpl->smarty->registered_objects['Route'][0]->GetArguments('album');?>
">相册管理 </a> <span class="divider">/</span></li>
        <li class="active">添加照片</li>
    </ul>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="bb-alert alert alert-info" style="display: none;">
                <span>操作成功</span>
            </div>
          
            <div class="well">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#home" data-toggle="tab">请填写详细信息</a></li>
    </ul>	
	
		<div id="myTabContent" class="tab-content">
    

        <div class="tab-pane active in" id="home">
            <form id="tab" method="post" action="./?application=admin&controller=album_picture&method=add&action=save">         
            <input type="hidden" value="<?php echo $_smarty_tpl->smarty->registered_objects['Route'][0]->GetArguments('album');?>
" name="album"/>
            <div id="container1">                      
                <input type="text" value="" id="remark1" name="remark1" class="input-small"/>
                <input type="text" value="" id="file1" name="file1" class="input-xlarge"/>                
                <a control="file1" class="btn btn-info" style="vertical-align:top" action="upload">上传图片</a>  
            </div>  
            <span id="flag" style="display:none;">
                <input value="2" type="hidden" id="index" name="count" />
            </span>                        				                
            <div id="template" style="display:none;">
                <div id="container#INDEX#">                      
                    <input type="text" value="" id="remark#INDEX#" name="remark#INDEX#" class="input-small"/>
                    <input type="text" value="" id="file#INDEX#" name="file#INDEX#" class="input-xlarge"/>                
                    <a control="file#INDEX#" class="btn btn-info" style="vertical-align:top" action="upload" onclick="a(this)">上传图片</a>  
                </div>                        
            </div>
            <div class="btn-toolbar">
                <button type="submit" class="btn btn-primary"><strong>提交</strong></button>                 
                <li id="addfield" class="btn btn-default">增加</li>
                <li id="deletefield" class="btn btn-default">删除</li>                                       
            </div>
            <script type="text/javascript">
				$('#addfield').click(function(){
				    var index=$('#index');
					var template=$('#template').html().toString().replace(/#INDEX#/g,index.val());
					index.val(parseInt(index.val())+1);
					$('#flag').before(template);
				});
				$('#deletefield').click(function(){												
					var index=$('#index');
					if('2'===index.val()){
						return false;
					}						
					var currentIndex=parseInt(index.val())-1;		
					$('#container'+currentIndex).remove()
					index.val(currentIndex);
				});				
            </script>  
            </form>
        </div>
        
        
        
<div class="modal hide fade" id="myModal" style="width:300px;top:60%;left:60%;">
  <div class="modal-body">
  <form target="uc" action="./?application=admin&controller=album_picture&method=upload" method="post" enctype="multipart/form-data" style="padding:0px; margin:0px;">
<input type="file" name="file" />

<div id="uploaderror"></div>
<input type="text" name="control" id="control" style="display:none;" />
  </div>
  <div class="modal-footer">
    <a href="#" class="btn" data-dismiss="modal">关闭</a>
      <input type="submit" class="btn" value="确定" />
  </div>
  </form>
  <iframe id="uc" name="uc" width="500" height="500" style="display:none;"></iframe>
</div>        
    </div>
</div>
<script>
function a(object){
	var field=$(object).attr('control');
	if(undefined===field){
		field=($(this).attr('control'));
	}
    $('#control').val(field);	
	$('#myModal').modal({
		backdrop:true,
		keyboard:true,
		show:true
    });	
}
function b(){
		var obj=$(this);
		$('#icon_preview').removeClass().addClass(obj.text());
		$('#icon_id').val(obj.text());
		$('#myModal').modal('toggle');
}
$('a[action="upload"]').click(a);
$('.icon').click(b);
</script> 
</div>
<script>
$('#icon_select1,#icon_select2,#icon_select3,#icon_select4,#icon_select5').click(function(){			
    $('#control').val($(this).attr('control'));	
	$('#myModal').modal({
		backdrop:true,
		keyboard:true,
		show:true
    });	
});
$('.icon').click(function(){
		var obj=$(this);
		$('#icon_preview').removeClass().addClass(obj.text());
		$('#icon_id').val(obj.text());
		$('#myModal').modal('toggle');
});
</script> 
<?php $_template = new Smarty_Internal_Template("_footer_common.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>
<?php $_template = new Smarty_Internal_Template("_footer.html", $_smarty_tpl->smarty, $_smarty_tpl, $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null);
 echo $_template->getRenderedTemplate();?><?php unset($_template);?>